
class A {

}
class B extends A {

}
class C extends B {

}

public class Test2 {
    public static void main(String[] args) {
        A a1 = new A();
        A a2 = new B();
        A a3 = new C();
    }
}
